package vos.vn;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RatingBar;

public class CustomComponentsActivity extends Activity implements OnClickListener{
	Button button;
	RatingBar rating;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        button = (Button)findViewById(R.id.button1);
        button.setOnClickListener(this);
        rating = (RatingBar)findViewById(R.id.ratingBar1);
        rating.setRating(2);
        rating.getScrollX();
        rating.getWidth();        
    }
    
	@Override
	public void onClick(View v) {
		button.setText( Integer.toString(button.getDrawableState()[0]) );
		Intent intent = new Intent(v.getContext(), Tab.class);
		this.startActivityForResult(intent, 0);
	}
}